package com.itheima.health.service;

import com.itheima.health.entity.PageResult;
import com.itheima.health.entity.QueryPageBean;
import com.itheima.health.pojo.Menu;
import com.itheima.health.pojo.User;

import java.util.List;

/**
 * @author by Dragon
 * @Classname MenuService
 * @Description TODO
 * @Date 2020/2/23 13:15
 * @Version 1.0
 */
public interface MenuService {
    /**
     * 拿到menu 根据权限用户
     *
     * @param user 登录的用户
     * @return menu对象
     */
    List<Menu> getMenuByUser(User user);

    //查询父类菜单分页
    PageResult findParentMenu(QueryPageBean queryPageBean);

    //查询子类菜单
    List<Menu> findChildrenMenuByParentMenuId(Integer id);

    //获取父类弹出窗口
    Menu findParentMenuById(Integer id);

    //获取子类弹出窗口
    Menu findChildrenMenuById(Integer id);

    //添加父类菜单
    Menu addParent(Menu parentMenu);

    //添加子类菜单
    void addChildren(Menu childrenMenu);

    //删除父类菜单
    void delParentById(Integer id);

    //删除子类菜单
    void delChildrenById(Integer id);

    void editParent(Menu parentMenu, int priorityInDB);

    public void editChildren(Menu childrenMenu, int priorityInDB);

    //菜单数据回显
    List<Menu> findMenuInfo();

}